feat: Code Sync for VS Code extension with cartridge management#382
Merged
feat: Code Sync for VS Code extension with cartridge management#382
Conversation
…ement Add file watcher with automatic upload, deploy command, cartridge tree view, and code version management to the VS Code extension. Extract reusable uploadFiles and downloadSingleCartridge functions in the SDK for efficient per-file and per-cartridge operations. SDK changes: - Extract batch upload pipeline into uploadFiles() from watchCartridges() - Add downloadSingleCartridge() for per-cartridge download (ZIPs only the target cartridge instead of entire code version) - downloadCartridges() now uses per-cartridge download when include filter set - Add autoUpload config field (dw.json: "autoUpload" / "auto-upload") VS Code extension: - CodeSyncManager: file watcher using VS Code FileSystemWatcher with debounced batch upload, status bar toggle, per-instance state persistence - Deploy command with cartridge selection and activate/reload options - Cartridge tree view with discovered cartridges and context menu actions: upload, download from instance, add/remove site cartridge path - Code version management: list, create, activate, reload, delete - Auto-start based on workspaceState or dw.json autoUpload setting - Auto-detect new cartridges via .project file watcher - Move API Browser to separate SCAPI sidebar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an integrated code upload/sync feature to the VS Code extension, equivalent to
b2c code watchandb2c code deployfrom the CLI. Includes a cartridge tree view with instance operations and code version management.SDK changes (
@salesforce/b2c-tooling-sdk)uploadFiles()— extracted the batch zip-upload-unzip pipeline fromwatchCartridgesinto a standalone reusable function.watchCartridgesnow calls it internally (no behavior change for CLI users).downloadSingleCartridge()— new function that ZIPs only the target cartridge directory on the server instead of the entire code version.downloadCartridges()now automatically uses this when anincludefilter is specified, makingb2c code download -c cartridge_namesignificantly faster.autoUploadconfig field — new boolean indw.json(autoUpload/auto-upload) for IDE auto-sync default.VS Code extension (
b2c-vs-extension)Code Sync (file watcher):
FileSystemWatcher(not chokidar) — picks up external changes (webpack output, terminal commands)uploadFilesautoUpload→ off.projectfile watcherCartridge tree view (
b2cCartridgeExplorer):Code version management:
Deploy command:
Other:
$(symbol-interface)icon